﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.AspNet.Identity.Owin;
using Owin;
using CorreoSocialWeb.Models;

using Subgurim.Controles;
using Subgurim.Controles.GoogleChartIconMaker;

namespace CorreoSocialWeb.Views
{
    public abstract class ControlHelper     
    {
        protected abstract Control ParentControl { get; }

        public T FindControl<T>(string nombre) where T : class
        {
            var prefix = typeof(T).Name;

            return this.ParentControl.FindControl(prefix + nombre) as T;
        }

        public CoordenadasDeSesionHelper CoordenadasDeSesion
        { 
            get
            {
                return new CoordenadasDeSesionHelper(this.ParentControl.Page);
            }
        }

        public ControlHelper(Control parentControl)
        {
            
        }
    }
}